<tal:block metal:define-macro="standard">
  
  <span tal:condition="edit | NULL">
    <form name="config" method="post" action="${getPath}/ticket/detail/save/${detail/ticket/0/id | NULL}" multipart="" enctype="multipart/form-data">      
      <input type="hidden" name="tid" value="${detail/ticket/0/id | NULL}" />
      <tal:block metal:use-macro="ticket/form.xhtml/standard" />
    </form>
    <br /><br /><br />
  </span>

  <table style="margin-bottom: 25px;" tal:condition="not:edit | NULL">
    
    <tr style="background-color:#e3e3e3; font-weight: bold;">
      <td colspan="4">
        ${detail/ticket/0/hinweis_titel | NULL}
        <span style="float:right;">
          <a type="button" aria-label="Left Align" class="btn btn-default glyphicon glyphicon-pencil" aria-hidden="true" href="${getPath}/ticket/detail/edit/${detail/ticket/0/id | NULL}" />
          <a type="button" aria-label="Left Align" class="btn btn-default glyphicon glyphicon-trash" aria-hidden="true" href="${getPath}/ticket/detail/delete/${detail/ticket/0/id | NULL}" onclick="return confirm('${text/inventory_hardware_delete | NULL}');" />          
        </span>
      </td>
    </tr>

    <tr>
      <td style="width:20%;">${text/ticket_status | NULL}</td>
      <td style="width:30%;font-weight:bold;">${detail/ticket/0/ticket_status | NULL}</td>
      <td style="width:20%;">${text/ticket_fortschritt | NULL}</td>
      <td style="width:30%;font-weight:bold;">
        <div class="progress">
          <div class="progress-bar" role="progressbar" aria-valuenow="${detail/ticket/0/fortschritt | NULL}" aria-valuemin="0" aria-valuemax="100" style="width: ${detail/ticket/0/fortschritt | NULL}%; height:18px; color:#444; text-align:center;">
            ${detail/ticket/0/fortschritt | NULL}%
          </div>
        </div>
      </td>
    </tr>
    
    <tr>
      <td>${text/ticket_zuordnung | NULL}</td>
      <td style="font-weight:bold;">${detail/ticket/0/zuordnung | NULL}</td>
      <td>${text/ticket_prio | NULL}</td>
      <td style="font-weight:bold;">${detail/ticket/0/prio | NULL}</td>
    </tr>
    
    <tr>
      <td>${text/ticket_abgabe_datum | NULL}</td>
      <td style="font-weight:bold;">${detail/ticket/0/niceAbgabetermin | NULL}</td>
      <td>${text/ticket_system | NULL}</td>
      <td style="font-weight:bold;">
        <a data-toggle="tooltip" data-placement="left" title="${detail/ticket/0/smt_system | NULL}" href="${getPath}/${detail/ticket/0/smt_system/serverart | NULL}/detail/${detail/ticket/0/smt_system/id | NULL}">${detail/ticket/0/smt_system/bezeichnung | NULL}</a>
      </td>
    </tr>
    
  </table>
  
  <table style="margin-bottom: 25px;" tal:condition="not:edit | NULL">
    
    <tr style="background-color:#e3e3e3; font-weight: bold;">
      <td colspan="4">${detail/ticket/0/titel | NULL}</td>
    </tr>
    
    <tr>
      <td colspan="4"><span tal:content="structure detail/ticket/0/beschreibung | NULL" /></td>
    </tr>

  </table>
  
  <table  style="margin-bottom: 25px;">
    <tr style="background-color:#e3e3e3; font-weight: bold;">
      <td colspan="3">${text/knowledge_upload_hinweis | NULL}</td>
    </tr>

    <tr tal:condition="detail/ticket/0/anhang | NULL" tal:repeat="upload detail/ticket/0/anhang">
      <td style="width:80%;">${upload/name}</td>
      <td style="width:10%;">${upload/size}</td>
      <td style="width:10%;text-align:right;">
        <a type="button" aria-label="Left Align" class="btn btn-default glyphicon glyphicon-save" aria-hidden="true" href="${getPath}${getURL}/download/${upload/name}" />
      </td>
    </tr>

  </table>  
 
  <table tal:condition="detail/comment | NULL">
    
    <tr style="background-color:#e3e3e3; font-weight: bold;">
      <td colspan="4">${text/tickt_history_titel | NULL} ${detail/ticket/0/id | NULL}</td>
    </tr>
    
    <tr>
      <td colspan="4">
        
        <table style="margin-bottom: 25px;" tal:repeat="comment detail/comment">
          <tr>
            <td colspan="4">
              ${comment/hinweis_titel | NULL}<br /><br />
              <ul>
                <span tal:content="structure comment/hinweis_text" />
              </ul>
              
              <span tal:content="structure comment/beschreibung" />
              
            </td>
          </tr>
        </table>
        
      </td>
    </tr>
    
  </table>
  
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="myModalLabel">${text/ticket_system | NULL}</h4>
        </div>
        <div class="modal-body">
          ${detail/ticket/0/smt_system | NULL}
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        </div>
      </div>
    </div>
  </div>
  
</tal:block>